import { pget, postJson } from '@/utils/req';
import { modalApi } from '@/utils/modalReq';

// 流程配置列表
export function getTableList(data: any) {
  return pget(
    `${modalApi.common}/shopec-process-config/processconfig/page`,
    data,
  );
}

// 新增流程配置
export function processSave(data: any) {
  return postJson(
    `${modalApi.common}/shopec-process-config/processconfig/save`,
    data,
  );
}

// 修改流程配置
export function processUpdate(data: any) {
  return postJson(
    `${modalApi.common}/shopec-process-config/processconfig/update`,
    data,
  );
}

// 流程配置详情
export function getDetail(id: any) {
  return pget(
    `${modalApi.common}/shopec-process-config/processconfig/detail/${id}`,
  );
}

// 删除流程id
export function removeProcess(id: any) {
  return postJson(
    `${modalApi.common}/shopec-process-config/processconfig/remove?id=${id}`,
  );
}
